<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:composite="http://xmlns.jcp.org/jsf/composite">

    <h:body>
        <composite:interface>
            <composite:attribute name="bean" required="true"/>
        </composite:interface>

        <composite:implementation>
            
            <p:panel id="candidateDetailPanel" styleClass="noPaddingTitle noBorder noMargin panelDetailCandidate" rendered="#{cc.attrs.candidate!=null}">
                <h:outputText styleClass="titleText titleFont textAlignRight width100 block dialogHeader marginBottom05em" value="#{cc.attrs.candidate.name}"></h:outputText>
                
                <composite:insertChildren />

                <p:panel styleClass="inlineBlock verticalAlignTop noMargin noPadding noBorder detailCandidatePanel">
                    <div class="titleText titleFont grayBackgroundStrong titlePanel">
                        <span>#{messages.SearchGeneralInformation}</span>
                    </div>
                    <h:outputText class="bodyText block" rendered="#{cc.attrs.candidate.name!=null}" value="#{cc.attrs.candidate.name}"></h:outputText>
                    <h:outputText class="bodyText block" rendered="#{cc.attrs.candidate.birthDay!=null}" value="#{newSearchListBean.dateDifference(cc.attrs.candidate.birthDay)} #{messages.Years}"></h:outputText>
                    <h:outputFormat class="bodyText block marginBottom05em" rendered="#{cc.attrs.candidate.country!=null and cc.attrs.candidate.province!=null}" value="#{messages.IndexLocationMessage}">
                        <f:param value="#{cc.attrs.candidate.province.description}"></f:param>
                        <f:param value="#{cc.attrs.candidate.country.description}"></f:param>
                    </h:outputFormat>
                    <div class="titleText titleFont lightGraySectionBackground titlePanel">
                        <span>#{messages.Profile}</span>
                    </div>
                    <ui:repeat rendered="#{cc.attrs.candidate.candidateProfessionalInfoList!=null and !cc.attrs.candidate.candidateProfessionalInfoList.isEmpty()}" var="professionalInfo" value="#{cc.attrs.candidate.candidateProfessionalInfoList}">
                        <h:outputText styleClass="bodyText" value="#{sectorBundle[professionalInfo.sector.idSector.toString()]}, "></h:outputText>
                    </ui:repeat>
                    <div class="marginBottom05em"></div>
                    <div class="titleText titleFont grayBackgroundStrong titlePanel">
                        <span>#{messages.Language}</span>
                    </div>
                    <ui:repeat rendered="#{cc.attrs.candidate.candidateLanguageInfoList!=null and !cc.attrs.candidate.candidateLanguageInfoList.isEmpty()}" var="languageInfo" value="#{cc.attrs.candidate.candidateLanguageInfoList}">
                        <h:outputText styleClass="bodyText" value="#{languageBundle[languageInfo.language.idLanguage.toString()]} #{languageLevelBundle[languageInfo.languageLevel.idLanguageLevel.toString()]}, "></h:outputText>
                    </ui:repeat>
                    <div class="marginBottom05em"></div>
                </p:panel>
                <h:graphicImage rendered="#{cc.attrs.candidate.bodyFormal!=null}" style="width: 30%!important" styleClass="inlineBlock verticalAlignTop" value="/candidateFiles/#{cc.attrs.candidate.idCandidate.toString()}/images/#{cc.attrs.candidate.bustColor}"></h:graphicImage>
                <h:graphicImage rendered="#{cc.attrs.candidate.bodyFormal==null}" style="width: 30%!important" styleClass="inlineBlock verticalAlignTop" library="images" name="bustnotavailable.png"></h:graphicImage>                            
            </p:panel>
        </composite:implementation>
    </h:body>
</html>